<h2>DESCRIPTION</h2>

<em>t.connect</em> allows the user to set the temporal database connection.
The default setting is that the temporal database of
type <em>sqlite3</em> is located in the current mapset directory.

<p>The <b>-p</b> flag will display the current temporal database connection parameters.
<p>The <b>-pg</b> flag will display the current temporal database connection parameters
using shell style.
<p>The <b>-c</b> flag will silently check if the temporal database connection
parameters have been set, and if not will set them to use GRASS's
default values.

<h2>NOTES</h2>

Setting the connection with <em>t.connect</em> will not test the connection for validity.
Hence a database connection will not be established.
<p>
The connection values are stored in the mapset's <tt>VAR</tt> file.
The <b>-d</b> flag will set the default
TGIS connection parameters.
A SQLite database "tgis/sqlite.db" will be created in the current mapset directory.
It will be located in the "tgis" sub-directory to not
interfere with the <em>sqlite3</em> database used for vector attribute storage.
<p>
In case you have tens of thousands of maps to register in the
temporal database or you need concurrent read and write access in the
temporal database, consider to use a PostgreSQL connection instead.
<p>
Be aware that you have to set the PostgreSQL connection explicitly in
every mapset that should store temporal information in the temporal database.
<p>
PostgreSQL and SQLite databases can not be mixed in a location.

<h2>EXAMPLES</h2>

<h3>SQLite</h3>
The SQLite database is created automatically when used the first time.
<div class="code"><pre>
# use single quotes here
t.connect driver=sqlite database='$GISDBASE/$LOCATION_NAME/PERMANENT/tgis/sqlite.db'
t.connect -p
t.info -s
</pre></div>

<p>

<h3>PostgreSQL</h3>

When using a PostgreSQL database, the user will need to specify the TGIS
database connection for each mapset.

<div class="code"><pre>
t.connect driver=pg database="dbname=grass_test user=soeren password=abcdefgh"
t.connect -p
t.info -s
</pre></div>

<h2>AUTHOR</h2>

Soeren Gebbert, Th&uuml;nen Institute of Climate-Smart Agriculture

<!--
<p>
<i>Last changed: $Date$</i>
-->
